{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=113
  Verdict: Accepted
}
uses SysUtils, Math;
 
const
	eps:double=1e-6;
 
var
	i,n:longint;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(n);
i:=1;
while i<=n do begin
  if abs(trunc(sqrt(i))-sqrt(i))<eps then write(i,' ');
	inc(i);
end;
end.